﻿#ifndef SCANRULE_H
#define SCANRULE_H

#include "qbaseentity.h"

class ScanRule : public QBaseEntity
{
    Q_OBJECT
    // 使用 Q_PROPERTY 宏定义属性
    Q_PROPERTY(uint64_t id READ getId WRITE setId)
    Q_PROPERTY(QString filterContent READ getFilterContent WRITE setFilterContent)
    Q_PROPERTY(bool byFileName READ getByFileName WRITE setByFileName)
    Q_PROPERTY(bool byFileContent READ getByFileContent WRITE setByFileContent)
    Q_PROPERTY(QString moveDir READ getMoveDir WRITE setMoveDir)
public:
    explicit ScanRule(QObject *parent = nullptr);
    ~ScanRule();

public:

    uint64_t getId() const;
    void setId(const uint64_t &value);

    QString getFilterContent() const;
    void setFilterContent(const QString &value);

    bool getByFileName() const;
    void setByFileName(bool value);

    bool getByFileContent() const;
    void setByFileContent(bool value);

    QString getMoveDir() const;
    void setMoveDir(const QString &value);

private:
    uint64_t id;    //id
    QString filterContent;     //过滤内容
    bool byFileName;        //根据文件名
    bool byFileContent;     //根据文件内容
    QString moveDir;        //移动路径
};

#endif // SCANRULE_H
